Skip to content

Add OpenAPI smoke tests to PR verification - #48

Closed
christianhelle with Copilot wants to merge 8 commits into
mainfrom
copilot/add-smoke-tests-suite
Closed

Add OpenAPI smoke tests to PR verification#48
christianhelle with Copilot wants to merge 8 commits into
mainfrom
copilot/add-smoke-tests-suite

Conversation

Copilot AI commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

Adds smoke coverage for generated Zig clients so PRs verify that OpenAPI examples under openapi/ can generate code and that the generated code compiles. The suite runs specs one at a time with per-spec output to make failing inputs easy to identify.

  • Smoke test script

    • Added test/smoke-tests.ps1.
    • Builds openapi2zig unless -UseInstalled is provided.
    • Discovers OpenAPI example specs under openapi/, excluding openapi/json-schema.
    • Generates each supported JSON spec into an isolated .zig-cache/smoke-tests/... folder.
    • Compiles each generated client with a small Zig test harness.
    • Skips YAML by default until YAML input support is available; -IncludeYaml is available for future coverage.
  • CI integration

    • Updated the PR smoke-test job to run the new PowerShell smoke suite.
    • Added an explicit 15-minute timeout for the smoke-test step.
  • Documentation

    • Documented the smoke test command and expected runtime in README.md.
pwsh ./test/smoke-tests.ps1

Copilot AI and others added 8 commits April 30, 2026 14:40
Agent-Logs-Url: https://github.com/christianhelle/openapi2zig/sessions/a6efb0d4-81d7-415c-be7d-1f32a3f0c357

Co-authored-by: christianhelle <710400+christianhelle@users.noreply.github.com>
Agent-Logs-Url: https://github.com/christianhelle/openapi2zig/sessions/a6efb0d4-81d7-415c-be7d-1f32a3f0c357

Co-authored-by: christianhelle <710400+christianhelle@users.noreply.github.com>
Agent-Logs-Url: https://github.com/christianhelle/openapi2zig/sessions/a6efb0d4-81d7-415c-be7d-1f32a3f0c357

Co-authored-by: christianhelle <710400+christianhelle@users.noreply.github.com>
Agent-Logs-Url: https://github.com/christianhelle/openapi2zig/sessions/a6efb0d4-81d7-415c-be7d-1f32a3f0c357

Co-authored-by: christianhelle <710400+christianhelle@users.noreply.github.com>
Agent-Logs-Url: https://github.com/christianhelle/openapi2zig/sessions/a6efb0d4-81d7-415c-be7d-1f32a3f0c357

Co-authored-by: christianhelle <710400+christianhelle@users.noreply.github.com>
Agent-Logs-Url: https://github.com/christianhelle/openapi2zig/sessions/a6efb0d4-81d7-415c-be7d-1f32a3f0c357

Co-authored-by: christianhelle <710400+christianhelle@users.noreply.github.com>
Agent-Logs-Url: https://github.com/christianhelle/openapi2zig/sessions/a6efb0d4-81d7-415c-be7d-1f32a3f0c357

Co-authored-by: christianhelle <710400+christianhelle@users.noreply.github.com>
Agent-Logs-Url: https://github.com/christianhelle/openapi2zig/sessions/a6efb0d4-81d7-415c-be7d-1f32a3f0c357

Co-authored-by: christianhelle <710400+christianhelle@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a PowerShell-based smoke test suite to CI so PRs validate that all example OpenAPI/Swagger JSON specs under openapi/ can (1) generate Zig client code via openapi2zig and (2) successfully compile via a small Zig test harness.

Changes:

  • Added test/smoke-tests.ps1 to generate and compile a client per spec with per-spec output directories and logging.
  • Updated CI smoke-test job to run the PowerShell smoke suite with a 15-minute step timeout.
  • Documented the smoke test command and intent in README.md.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
test/smoke-tests.ps1 Implements per-spec generation + compilation smoke coverage, with JSON-only default and optional YAML inclusion.
README.md Documents the new smoke test script, what it checks, and expected runtime characteristics.
.github/workflows/ci.yml Replaces the previous sample generation step with the new smoke test step (pwsh) and adds a timeout.

@christianhelle
christianhelle deleted the copilot/add-smoke-tests-suite branch April 30, 2026 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants